﻿using MvcApplication2.Models.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MvcApplication2.Models.Services
{
    public class TrangThaiSanPhamService
    {
        public static List<TrangThaiSanPham> LayDanhSachTrangThaiSanPham()
        {
            MyDataProvider.Open();
            var trangThaiSanPhamList = Utility.ToList<TrangThaiSanPham>(MyDataProvider.excuteQuery("spu_trangthaisanpham_getAll")).Where(r=>r.ID==DummyEnum.TrangThaiSanPhamEnum.DaDatMua.GetHashCode() || r.ID==DummyEnum.TrangThaiSanPhamEnum.DaNhanHang.GetHashCode()).ToList();
            MyDataProvider.Close();
            return trangThaiSanPhamList;
        }
    }
}